package com.only4play.codegen.support.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.only4play.codegen.support.annotation.FieldDesc;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @author mdy
 * * @date 2024/9/16
 */
@Data
public class BaseEntity implements Serializable {

    @FieldDesc(name = "实体id")
    private Long id;

    @FieldDesc(name = "数据版本")
    private int version;


    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @FieldDesc(name = "创建时间")
    private Date createTime;

    @TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
    @FieldDesc(name = "更新时间")
    private Date updateTime;

    @TableField(value = "create_user_id",fill = FieldFill.INSERT)
    @FieldDesc(name = "创建人")
    private Long createUserId;

    @TableField(value = "update_user_id",fill = FieldFill.INSERT_UPDATE)
    @FieldDesc(name = "更新人")
    private Long updateUserId;


}
